<template>
  <div class="page-pagesetting">
    <Card dis-hover :bordered="false">
      <p slot="title">工作流属性</p>
      <p class="item">
        <span>工作流名称：</span> {{name}}
      </p>
      <p class="item">
        <span style="text-align:right">创建日期：</span> {{createTime}}
      </p>
      <p class="item">
        <span>任务流描述：</span> {{desc}}
      </p>
    </Card>
  </div>
</template>

<script>
import { formatDateByStringMatch } from 'assets/scripts/common'
export default {
  props: ['type'],
  data () {
    return {
      name: '',
      createTime: '',
      desc: ''
    };
  },
  methods: {},
  mounted () {
    let pipelineId = this.$route.query.pipelineId;
    let row = JSON.parse(localStorage[`workflowInfo${pipelineId}`]);
    this.name = row.name;
    this.createTime = row.createTime ? formatDateByStringMatch(row.createTime) : '无'
    this.desc = row.desc ? row.desc : '无';
  }
};
</script>

<style rel="stylesheet/less" lang="less" scoped>
.page-pagesetting {
  .item {
    margin-bottom: 20px;
    span {
      display: inline-block;
      width: 84px;
      text-align: left;
      font-weight: bold;
    }
  }
}
</style>
